let vm = new Vue({
    el: "#index",
    data: {
        showMsg: false,
        message: "",
        radio: "yes",
        dataList: [],
        lookList: [],   //进度
        showneed: ""
    },
    methods: {
        getData() {
            leiku.post('http://dongtai.fsslpc.com/api/2020091023973909', { spid: leiku.GetUrlParam('spid') }, res => {
                let data = res.data;
                console.log(data)
                if (data.a.length) {
                    this.dataList = data.a;
                    this.lookList = data.b;
                    this.showneed = data.a[0].need
                }
            })
        },

        // 审核按钮
        clickMsgBtn() {
            this.showMsg = true;
        },
        // 审核保存按钮
        onSubmit() {
            leiku.post('http://dongtai.fsslpc.com/api/2020091807904496', {
                id: this.dataList[0].id,
                needqxzt: this.dataList[0].needqxzt,
                content: this.radio == "yes" ? this.dataList[0].yes : this.dataList[0].no,
                idea: this.message,
                shenpibh: this.dataList[0].s1,
                creator: this.dataList[0].c1,
                bmid: this.dataList[0].bmid,
                dt_dj1qko: window.localStorage.getItem('dt_dj1qko') ? JSON.parse(window.localStorage.getItem('dt_dj1qko')).str : ''
            }, res => {
                this.$toast('保存成功！')
                this.showMsg = false;
                // window.location.reload();
            });
        },

    },
    mounted() {
        this.getData();
    }
})